﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Web.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<MVCWeb.Models.OrderItemModel>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	PlaceOrder
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Your order has been placed!</h2>

    <h4>Order Summary:</h4>

    <table>
        <tr>
            <th></th>
            <th>
                Product ID
            </th>
            <th>
                Quantity
            </th>
            <th>
                Subtotal
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>

            <td></td>
            <td>
                <%: item.product_id %>
            </td>
            <td>
                <%: item.quantity %>
            </td>
            <td>
                <%: String.Format("{0:F}", item.sub_total) %>
            </td>
        </tr>
    
    <% } %>

    </table>
 

    <p>
        <%: Html.ActionLink("Back to Carts", "WebIndex", "Order") %>
    </p>

</asp:Content>